﻿
namespace Marmat.Forms.Views
{
    namespace Grid
    {
        public class ValidateEditEventArgs : RowColCancelEventArgs
        {

            /* TODO ERROR: Skipped RegionDirectiveTrivia */
            internal DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs args;
            /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
            /* TODO ERROR: Skipped RegionDirectiveTrivia */
            internal ValidateEditEventArgs(BaseGrid gridControl, int rowHandle, Column column, DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs args) : base(gridControl, rowHandle, column)
            {
                this.args = args;
            }
            /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
            /* TODO ERROR: Skipped RegionDirectiveTrivia */
            public object Value
            {
                get
                {
                    return this.args.Value;
                }

                set
                {
                    this.args.Value = value;
                }
            }

            /// <summary>
            /// 获取或设置错误说明
            /// </summary>
            /// <value></value>
            /// <returns></returns>
            /// <remarks></remarks>
            public string ErrorText
            {
                get
                {
                    return this.args.ErrorText;
                }

                set
                {
                    this.args.ErrorText = value;
                }
            }

            /// <summary>
            /// 逻辑型，设为True表示无法通过验证，禁止退出编辑模式。
            /// </summary>
            /// <value></value>
            /// <returns></returns>
            /// <remarks></remarks>
            public new bool Cancel
            {
                get
                {
                    return !this.args.Valid;
                }

                set
                {
                    this.args.Valid = !value;
                }
            }
            /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        }
    }
}